// =============================================================
// CShell
// ---------------------------------------
// Author : Woo-Hyun Kim
// Email : woorung@icu.ac.kr or woorung@nhncorp.com
// Date : Jul. 25, 2006
// =============================================================
#ifndef CShellH
#define CShellH
//-----------------------------------------------------------------
#include <iostream>
#include <iterator>
#include <vector>
#include <list>
#include <map>
#include <algorithm>
#include <fstream>
#include <string>

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>

#include "CProcess.h"

using namespace std;
//---------------------------------------------------------------
class CShell : public CProcess {
private :
	string command;
	string command_result;

	string &execute(string &command, string &command_result);

public :
	CShell();
	CShell(string &cmd);
	~CShell();

	// overridden
	void run();

	string &getCommand();
	string &getCommandResult();
};
//---------------------------------------------------------------
#endif
